<?php

include_once dirname(dirname(__FILE__)) . '/include/common.php';
$core = new core();
$customer_order_id = isset($_POST["customer_order_id"]) ? intval($_POST["customer_order_id"]) : 0;
$customer_order = $core->getZenCustomerOrderById($customer_order_id);
if (!$customer_order) {
    echo json_encode(array('type' => 1, 'msg' => "Đơn hàng không tồn tại!"));
    die;
}
$customer = $core->getCustomerById($customer_order->customer_id);
$html = $core->renderPayment($customer_order_id);

echo json_encode(array('type' => 0,'customer_order_id'=>$customer_order_id ,'customer_name' => $customer->facebook_name,'html'=>$html));
die;
?>
